package edu.nf.ch10.demo1;

/**
 * @author wangl
 * @date 2025/4/17
 */
public class Main {

    public static void main(String[] args) {
        //实例化三个节点
        AbstractHandler handlerA = new HandlerA();
        AbstractHandler handlerB = new HandlerB();
        AbstractHandler handlerC = new HandlerC();
        //连接节点,组装成链
        handlerA.setNextHandler(handlerB);
        handlerB.setNextHandler(handlerC);
        //从A节点开始执行
        handlerA.execute(1500);

    }
}